summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glucometerutils/drivers/fsoptium.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/glucometerutils/drivers/fsoptium.py b/glucometerutils/drivers/fsoptium.py
index 5c57ae3..1e1a319 100644
--- a/glucometerutils/drivers/fsoptium.py
+++ b/glucometerutils/drivers/fsoptium.py
@@ -90,11 +90,15 @@ class Device(serial.SerialDevice):
def _send_command(self, command):
cmd_bytes = bytes('$%s\r\n' % command, 'ascii')
+ logging.debug('Sending command: %r', cmd_bytes)
+
self.serial_.write(cmd_bytes)
self.serial_.flush()
response = self.serial_.readlines()
+ logging.debug('Received response: %r', response)
+
# We always want to decode the output, and remove stray \r\n. Any failure in
# decoding means the output is invalid anyway.
decoded_response = [line.decode('ascii').rstrip('\r\n')